package com.sz.biz.logistics.base.dto;

import com.sz.common.base.entity.Entity;

public class CountryPort implements Entity {
    /**
     * 二字码
     */
    private String countryCode;
    /**
     * 地区id
     */
    private String areaId;
    /**
     * 运输工具
     */
    private Integer transportId;

    /**
     *
     */
    private String name;
    private String enName;
    private String triadCode;

    /**
     * type
     *
     * @param countryCode
     * @param name
     */

    private int type;

    public String getAreaId() {
        return areaId;
    }

    public void setAreaId(String areaId) {
        this.areaId = areaId;
    }

    public Integer getTransportId() {
        return transportId;
    }

    public void setTransportId(Integer transportId) {
        this.transportId = transportId;
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    public CountryPort() {
    }

    public CountryPort(String countryCode, String name) {
        this.countryCode = countryCode;
        this.name = name;
    }

    public CountryPort(int type, String countryCode, String areaId, String name,String enName) {
        this.type = type;
        this.areaId = areaId;
        this.countryCode = countryCode;
        this.name = name;
        this.enName = enName;
    }


    public String getCountryCode() {
        return countryCode;
    }

    public void setCountryCode(String countryCode) {
        this.countryCode = countryCode;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getEnName() {
        return enName;
    }

    public void setEnName(String enName) {
        this.enName = enName;
    }


    public String getTriadCode() {
        return triadCode;
    }

    public void setTriadCode(String triadCode) {
        this.triadCode = triadCode;
    }

    public CountryPort(String countryCode, Integer transportId, int type) {
        this.countryCode = countryCode;
        this.transportId = transportId;
        this.type = type;
    }

    public CountryPort(String countryCode, String areaId, Integer transportId, String name,String enName) {
        this.countryCode = countryCode;
        this.areaId = areaId;
        this.transportId = transportId;
        this.name = name;
        this.enName = enName;
    }

    public CountryPort(String countryCode, String areaId, Integer transportId, String name, String enName, String triadCode, int type) {
        this.countryCode = countryCode;
        this.areaId = areaId;
        this.transportId = transportId;
        this.name = name;
        this.enName = enName;
        this.triadCode = triadCode;
        this.type = type;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }

        CountryPort that = (CountryPort) o;

        if (countryCode != null ? !countryCode.equals(that.countryCode) : that.countryCode != null) {
            return false;
        }
        return transportId != null ? transportId.equals(that.transportId) : that.transportId == null;
    }

    @Override
    public int hashCode() {
        int result = countryCode != null ? countryCode.hashCode() : 0;
        result = 31 * result + (transportId != null ? transportId.hashCode() : 0);
        return result;
    }
}